import ajax from "@/utils/ajax";

//获取验证码
export const reqSendCode = (phone) => ajax.get(`/api/user/passport/sendCode/${phone}`)

//请求注册
export const reqRegister = (paramsObj) => ajax.post(`/api/user/passport/register`,paramsObj)

//请求登录
export const reqLogin = (paramsObj) => ajax.post('/api/user/passport/login',paramsObj)

//token获取用户信息
export const reqUserInfo = () => ajax.get('/api/user/passport/auth/getUserInfo')

//退出登录
export function reqLogout() {
    return ajax({
        url: '/api/user/passport/logout',
        method: 'get',
    });
}